package model;

import java.util.Vector;


public class YSearchResponse {
	
	private ResultSetWeb rsw;
	private String responsecode;

	public String getResponsecode() {
        return responsecode;
    }

    public void setResponsecode(String responsecode) {
        this.responsecode = responsecode;
    }

    public ResultSetWeb getResultSet() {
		return rsw;
	}

	public void setResultSet(ResultSetWeb rsw) {
		this.rsw = rsw;
	}

	@Override
	public String toString() {
		return "response code: " + responsecode + "\n" + rsw.toString();
	}

  public Vector<Doc> getResultsAsDocs() {
    return rsw.getResultsAsDocs();
  }

  public int getCount() {
    return Integer.parseInt(rsw.getCount());
  }
  
  public int getTotalCount() {
    return Integer.parseInt(rsw.getTotalhits());
  }
  
//  public void append(YSearchResponse response) {
//    rsw.append(response.getResultSet());
//  }
	

}
